package com.yl.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yl.auth.entity.XinzifuliBean;
import com.yl.auth.entity.XinzimingxiBean;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * @author 王帅洋
 * @datetime 2023/6/28 16:01
 * @description 类对象
 */
public interface XinzifuliMapper extends BaseMapper<XinzifuliBean> {
    IPage<XinzifuliBean> getAllpage(Page<XinzifuliBean> page, @Param("xinzi") XinzifuliBean xinzifuliBean);

    @Select(" select y.id,y.`name`,y.phone,y.idcard,x.timee,x.numbers,x.money FROM xinzimingxi x\n" +
            "        LEFT JOIN yuangong y on x.yuangong_id=y.id\n" +
            "        where y.id=#{id}")
    XinzifuliBean getXinziId(Long id);

    @Update("update xinzifuli set state=0 where yuangong_id=#{id}")
    void updatexinzi(@Param("id")Integer id);


//    XinzifuliBean getbyId(Long id);
}
